//	ID : pallab81
// 	PROG : 11420
// 	LANG : C++
// 	2011-08-31-17.42.20 Wednesday
//
// 	"I have not failed, I have just found 10000 ways that won't work.
//


#include <iostream>
#include <algorithm>
#include <vector>
#include <sstream>
#include <fstream>
#include <string>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <functional>
#include <bitset>

#include <ctime>
#include <cassert>
#include <cstdio>
#include <cmath>
#include <cstring>
#include <climits>
#include <cstring>
#include <cstdlib>

using namespace std;

#define VI vector< int >
#define CI( x ) scanf("%d",&x)
#define CL( x ) scanf("%lld",&x)
#define CD( x ) scanf("%lf",&x )
#define fo(i,st,ed) for(int i = st ; i < ed ; ++i )
#define foE(i,st,ed) for(int i = st ; i <= ed ; ++i )
#define foit(i, x) for (typeof((x).begin()) i = (x).begin(); i != (x).end(); i++)
#define bip system("pause")
#define Int long long
#define pb push_back
#define SZ(X) (int)(X).size()
#define LN(X) (int)(X).length()
#define mk make_pair
#define f first
#define s second
#define SET( ARRAY , VALUE ) memset( ARRAY , VALUE , sizeof(ARRAY) )

inline void wait( double seconds ) {
    double endtime = clock()+( seconds* CLOCKS_PER_SEC );
    while( clock() < endtime ) {
        ;
    }
}
int N,S;
Int memo[70][70][2];
//prev==1 = previous drawer is locked
//prev==0 = previous drawer is not locked
Int go(int id, int s, int prev) {
    if(id==N && s==0) {
        return 1;
    }
    if(id==N)return 0;

    Int& ways= memo[id][s][prev];
    if(ways!=-1) {
        return ways;
    }
    ways=0;
    if(id==0) {
        ways+= go(id+1,s,0); // lock na kore
        if(s-1>=0)
            ways+= go(id+1,s-1,1); //lock kore
    } else {
        if(prev==1) {
            ways+=go(id+1,s,0);//lock na kore
            if(s-1>=0)
                ways+=go(id+1,s-1,1); // lock kore
        } else {
            ways+=go(id+1,s,0); // lock na kore
            ways+=go(id+1,s,1);//lock kore
        }
    }
    return ways;
}
inline void Proc() {
    SET(memo,-1);
    Int var1 = go(0,S,0);
    cout<<var1<<"\n";
}

int main() {
#ifndef ONLINE_JUDGE
    freopen("in.txt","rt",stdin);
#endif

    while( scanf("%d %d",&N,&S)==2 ) {
        if( N<0 && S<0 ) break;
        Proc();
    }

    return 0;
}
